<!-- eslint-disable vue/multi-word-component-names -->
<template>
    <div>
        <!-- 编辑 -->
        <!-- 头部导航栏 -->
        <div class="Navigation">
            <van-nav-bar title="编辑评价" left-text="返回" left-arrow @click-left="onClickLeft">
                <template #right>
                    <van-icon name="chat-o" size="25" />
                </template>
            </van-nav-bar>
        </div>

        <div class="message">
            <el-form :model="form" label-width="auto" style="max-width: 300px">

                <el-input v-model="form.name" placeholder="请输入标题" />

                <el-select v-model="form.region" placeholder="请选择科室">
                    <el-option label="Zone one" value="shanghai" />
                    <el-option label="Zone two" value="beijing" />
                </el-select>

                <el-input v-model="form.desc" type="textarea" placeholder="请输入病症详情" />
            </el-form>

            <p style="line-height: 60px;margin-left: 12px;">请输入最近一段治疗经历</p>

            <!-- <van-field v-model="result" is-link readonly name="datetimePicker" label="时间选择" placeholder="点击选择时间"
                @click="showPicker = true" />
            <van-popup v-model:show="showPicker" position="bottom">
                <van-datetime-picker type="time" @confirm="onConfirm" @cancel="showPicker = false" />
            </van-popup> -->
            <van-field name="rate" label="评分">
                <template #input>
                    <van-rate v-model="value" />
                </template>
            </van-field>
            <van-field name="uploader" label="文件上传">
                <template #input>
                    <van-uploader v-model="values" />
                </template>
            </van-field>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
const onClickLeft = () => history.back();
import { reactive } from 'vue'

// Element组件引入
const form = reactive({
    name: '',
    region: '',
    date1: '',
    date2: '',
    delivery: false,
    type: [],
    resource: '',
    desc: '',
})
const value = ref(3);

// const result = ref('');
// const showPicker = ref(false);

// const onConfirm = (value: string) => {
//     result.value = value;
//     showPicker.value = false;
// };
const values = ref([
    { url: 'https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg' },
]);

</script>

<style scoped lang="scss">
.Navigation {
    border-bottom: solid 4px #ccc;
}
</style>